// 图像伪彩色IP，可实现灰度图像的伪彩色处理
module falsecolor(
    input              clk,
	input              rst_n,
	input              proc_en,
    input              sink_sop,
    input              sink_valid,
    input  [7:0]	   sink_data,		//{2{灰度数据}}	
    input              sink_eop,
    output             sink_ready,
	
    output             source_sop,
    output             source_valid,
    output [23:0]	   source_data,		//伪彩色数据
    output             source_eop,
    input              source_ready
);
wire [23:0]    data_w1;
wire           sop_w1,eop_w1,valid_w1;
// 伪彩色实现模块
falsecolor_proc falsecolor_proc_0(
    .clk(clk),
	 .rst_n(rst_n),
	 .proc_en(proc_en),
    .sink_sop(sink_sop),
    .sink_valid(sink_valid),
    .sink_data(sink_data),
    .sink_eop(sink_eop),
	 
    .source_sop(sop_w1),
    .source_valid(valid_w1),
    .source_data(data_w1),
    .source_eop(eop_w1)
);
// 同步模块
ast_readylatency_adapt#(
.DWIDTH(24),    
.FIFO_DEPTH(64) 
)falsecolor_readylatency_adapt(
	.clk(clk),
	.rst_n(rst_n),
	.sink_sop(sop_w1),
	.sink_valid(valid_w1),
	.sink_data(data_w1),
	.sink_eop(eop_w1), 
	.sink_ready(sink_ready),
	
	.source_sop(source_sop),
	.source_valid(source_valid),
	.source_data(source_data),
	.source_eop(source_eop),
	.source_ready(source_ready)
);
endmodule 